<?php 

Class ModuleDailySummaryResult extends CmsCustomModule {
	
    protected function __renderHead()
    {
		$filters = array('date');
		foreach($_GET as $k=>$v){
			if(in_array($k, $filters)){
				$$k = $v;
			}
		}
		$curr_datetime = date("Y-m-d H:i:s");
		$html = $this->getItemHTML();

		$this->contents = <<<HTML
	<div id="result" class="os_browser_result">
		<div class="hd">
			<div class="utility">
				<a href="#" class="print">Print</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				Export to <a href="#">HTML</a>
			</div>
			<hr />
			<h1>Daily Automated Executive Summary Report</h1>
			<div class="time">{$curr_datetime}</div><br />
			<div><b>Date:</b> {$date}</div>
		</div>
		<div class="bd">
 {$html}
		</div>
	</div>
HTML;
    }
	private function getItemHTML(){
return <<<HTML
<table border="0" cellpadding="0" cellspacing="0">
	<!--- Gender & Age Group start -->
  <tbody><tr>
    <td colspan="4" class="tit"><div align="center" class="STYLE1">View Frequency</div></td>
  </tr>
  <tr class="weight">
    <td bgcolor="#cccccc"><strong>Date</strong></td>
    <td bgcolor="#cccccc" class="num"><strong>No. of Stream</strong></td>
    
  </tr>
  <tr>
      <td>2010-04-10 </td>
    <td class="num">9,999,999</td>

  </tr>
</tbody></table>
         <br/>
	      <table border="0" cellpadding="0" cellspacing="0">
	<!--- Gender & Age Group start -->
  <tbody><tr>
    <td colspan="4" class="tit"><div align="center" class="STYLE1">Total Streaming Duration with bitrate</div></td>
  </tr>
  <tr class="weight">
    <td bgcolor="#cccccc"><strong>Bitrate</strong></td>
    <td bgcolor="#cccccc" class="num"><strong>Duration</strong></td>
    
  </tr>
  <tr>
      <td>200K</td>
      <td class="num">9,999,999</td>

  </tr>
  <tr>
      <td>500K</td>
      <td class="num">9,999,999</td>

  </tr>
   <tr>
      <td>1.5M</td>
      <td class="num">9,999,999</td>

  </tr>
</tbody></table>
 	               <br/>
<table border="0" cellpadding="0" cellspacing="0">
	<!--- Gender & Age Group start -->
  <tbody><tr>
    <td colspan="4" class="tit"><div align="center" class="STYLE1">Number of unique user</div></td>
  </tr>
  <tr class="weight">
    <td bgcolor="#cccccc"><strong>Date</strong></td>
    <td bgcolor="#cccccc" class="num"><strong>unique user</strong></td>
    
  </tr>
  <tr>
      <td>2010-04-10 </td>
    <td class="num">9,999,999</td>

  </tr>
</tbody></table>
	     <br/>
<table border="0" cellpadding="0" cellspacing="0">
	<!--- Gender & Age Group start -->
  <tbody><tr>
    <td colspan="5" class="tit"><div align="center" class="STYLE1">Subscriber with package</div></td>
  </tr>
  <tr class="weight">
    <td bgcolor="#cccccc"><strong>Subscriber package</strong></td>
    <td bgcolor="#cccccc" class="num"><strong>Total</strong></td>
        <td bgcolor="#cccccc" class="num"><strong>New</strong></td>
            <td bgcolor="#cccccc" class="num"><strong>Renew</strong></td>
                <td bgcolor="#cccccc" class="num"><strong>Churn</strong></td>
  </tr>
  <tr>
      <td>24h </td>
      <td class="num">9,999,999</td>
      <td class="num">9,999,999</td>
            <td class="num">9,999,999</td>
                  <td class="num">9,999,999</td>
  </tr>
  <tr>
      <td>One Week </td>
      <td class="num">9,999,999</td>
      <td class="num">9,999,999</td>
      <td class="num">9,999,999</td>
      <td class="num">9,999,999</td>
  </tr>
</tbody></table>
	    <br/>
<table border="0" cellpadding="0" cellspacing="0">
	<!--- Gender & Age Group start -->
  <tbody><tr>
    <td colspan="4" class="tit"><div align="center" class="STYLE1">Number of Errors reported</div></td>
  </tr>
  <tr class="weight">
    <td bgcolor="#cccccc"><strong>Date</strong></td>
    <td bgcolor="#cccccc" class="num"><strong>Error</strong></td>
    
  </tr>
  <tr>
      <td>2010-04-10 </td>
    <td class="num">9,999,999</td>

  </tr>
</tbody></table>

HTML;
	}
}
?>